#include<bits/stdc++.h>
using namespace std;
int main()
{
	char a[1005];
	int len;
	
	cin>>a;
	len=strlen(a);
	cout<<len;
	while (cin>>a)
	{
		len=strlen(a);
		cout<<','<<len;
	}
	
	return 0;
}